/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Messenj;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author edoardo
 */
public class ThreadNotificator extends Thread{
    
    Notificator n;

    public ThreadNotificator(String text)
    {
        n = new Notificator(text);
    }
    
    @Override
    public void run()
    {
        n.setUndecorated(true);
        n.setAlwaysOnTop(true);
        n.setSize(150, 50);
        n.setVisible(true);

        for(int i = 0; i < 100; i++)
        n.setSize(150, 50);
        n.setVisible(true);

        for(int i = 0; i < 100; i++)
        {
            n.setLocation(10, i);
            n.repaint();
            System.out.print("prova "+i +"\n");
            try {
                Thread.sleep(50);
            } catch (InterruptedException ex) {
                Logger.getLogger(Notificator.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

}
